<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>StrangeIoC: strange.extensions.pool.api.IPool Interface Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">StrangeIoC
   &#160;<span id="projectnumber">0.6.0</span>
   </div>
   <div id="projectbrief">The IoC/Binding Framework for Unity3D and C#</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Events</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacestrange.html">strange</a></li><li class="navelem"><a class="el" href="namespacestrange_1_1extensions.html">extensions</a></li><li class="navelem"><a class="el" href="namespacestrange_1_1extensions_1_1pool.html">pool</a></li><li class="navelem"><a class="el" href="namespacestrange_1_1extensions_1_1pool_1_1api.html">api</a></li><li class="navelem"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html">IPool</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">strange.extensions.pool.api.IPool Interface Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A mechanism for storing and reusing instances.  
 <a href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for strange.extensions.pool.api.IPool:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.png" usemap="#strange.extensions.pool.api.IPool_map" alt=""/>
  <map id="strange.extensions.pool.api.IPool_map" name="strange.extensions.pool.api.IPool_map">
<area href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html" title="A common interface for the constituents parts of a Binding, which at present are either a SemiBinding..." alt="strange.framework.api.IManagedList" shape="rect" coords="120,0,351,24"/>
<area href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool_3_01_t_01_4.html" alt="strange.extensions.pool.api.IPool&lt; T &gt;" shape="rect" coords="0,112,231,136"/>
<area href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool.html" alt="strange.extensions.pool.impl.Pool" shape="rect" coords="241,112,472,136"/>
<area href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool_3_01_t_01_4.html" alt="strange.extensions.pool.impl.Pool&lt; T &gt;" shape="rect" coords="0,168,231,192"/>
<area href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool_3_01_t_01_4.html" alt="strange.extensions.pool.impl.Pool&lt; T &gt;" shape="rect" coords="241,168,472,192"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a07042ef56c57b6a5569de6360196ab11"><td class="memItemLeft" align="right" valign="top">object&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a07042ef56c57b6a5569de6360196ab11">GetInstance</a> ()</td></tr>
<tr class="memdesc:a07042ef56c57b6a5569de6360196ab11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets an instance from the pool if one is available.  <a href="#a07042ef56c57b6a5569de6360196ab11">More...</a><br/></td></tr>
<tr class="separator:a07042ef56c57b6a5569de6360196ab11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00d776e7b4f1735e7da8026c7ec7386c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a00d776e7b4f1735e7da8026c7ec7386c">ReturnInstance</a> (object <a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a563724c81cc8fe5ec08025fe94e9f351">value</a>)</td></tr>
<tr class="memdesc:a00d776e7b4f1735e7da8026c7ec7386c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an instance to the pool.  <a href="#a00d776e7b4f1735e7da8026c7ec7386c">More...</a><br/></td></tr>
<tr class="separator:a00d776e7b4f1735e7da8026c7ec7386c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cbaa845454117ccec8389a27642a9b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a4cbaa845454117ccec8389a27642a9b0">Clean</a> ()</td></tr>
<tr class="memdesc:a4cbaa845454117ccec8389a27642a9b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all instance references from the Pool.  <a href="#a4cbaa845454117ccec8389a27642a9b0">More...</a><br/></td></tr>
<tr class="separator:a4cbaa845454117ccec8389a27642a9b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html">strange.framework.api.IManagedList</a></td></tr>
<tr class="memitem:a3554bb2e8ae2530f5da7f49ad588125c inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3554bb2e8ae2530f5da7f49ad588125c"></a>
<a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html">IManagedList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a3554bb2e8ae2530f5da7f49ad588125c">Add</a> (object <a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a563724c81cc8fe5ec08025fe94e9f351">value</a>)</td></tr>
<tr class="memdesc:a3554bb2e8ae2530f5da7f49ad588125c inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a value to this List. <br/></td></tr>
<tr class="separator:a3554bb2e8ae2530f5da7f49ad588125c inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adedb0a95aa816a2c04727cfc0557f7b9 inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adedb0a95aa816a2c04727cfc0557f7b9"></a>
<a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html">IManagedList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#adedb0a95aa816a2c04727cfc0557f7b9">Add</a> (object[] list)</td></tr>
<tr class="memdesc:adedb0a95aa816a2c04727cfc0557f7b9 inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a set of values to this List. <br/></td></tr>
<tr class="separator:adedb0a95aa816a2c04727cfc0557f7b9 inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0133a5665c429a548eac8731663f2b3c inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0133a5665c429a548eac8731663f2b3c"></a>
<a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html">IManagedList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a0133a5665c429a548eac8731663f2b3c">Remove</a> (object <a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a563724c81cc8fe5ec08025fe94e9f351">value</a>)</td></tr>
<tr class="memdesc:a0133a5665c429a548eac8731663f2b3c inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a value from this List. <br/></td></tr>
<tr class="separator:a0133a5665c429a548eac8731663f2b3c inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b226bf0a6e01a25dcd0e8d0bc86e297 inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b226bf0a6e01a25dcd0e8d0bc86e297"></a>
<a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html">IManagedList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a4b226bf0a6e01a25dcd0e8d0bc86e297">Remove</a> (object[] list)</td></tr>
<tr class="memdesc:a4b226bf0a6e01a25dcd0e8d0bc86e297 inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a set of values from this List. <br/></td></tr>
<tr class="separator:a4b226bf0a6e01a25dcd0e8d0bc86e297 inherit pub_methods_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:ada91aed79f4e553ceca25ef52427782c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_instance_provider.html">IInstanceProvider</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#ada91aed79f4e553ceca25ef52427782c">instanceProvider</a><code> [get, set]</code></td></tr>
<tr class="memdesc:ada91aed79f4e553ceca25ef52427782c"><td class="mdescLeft">&#160;</td><td class="mdescRight">A class that provides instances to the pool when it needs them.  <a href="#ada91aed79f4e553ceca25ef52427782c">More...</a><br/></td></tr>
<tr class="separator:ada91aed79f4e553ceca25ef52427782c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab967eecf4fc76c5716cad1493d74d295"><td class="memItemLeft" align="right" valign="top">Type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#ab967eecf4fc76c5716cad1493d74d295">poolType</a><code> [get, set]</code></td></tr>
<tr class="memdesc:ab967eecf4fc76c5716cad1493d74d295"><td class="mdescLeft">&#160;</td><td class="mdescRight">The object Type of the first object added to the pool.  <a href="#ab967eecf4fc76c5716cad1493d74d295">More...</a><br/></td></tr>
<tr class="separator:ab967eecf4fc76c5716cad1493d74d295"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ad2b0ade39b7af713a0dfc3ddaec7bf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a0ad2b0ade39b7af713a0dfc3ddaec7bf">available</a><code> [get]</code></td></tr>
<tr class="memdesc:a0ad2b0ade39b7af713a0dfc3ddaec7bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the count of non-committed instances  <a href="#a0ad2b0ade39b7af713a0dfc3ddaec7bf">More...</a><br/></td></tr>
<tr class="separator:a0ad2b0ade39b7af713a0dfc3ddaec7bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89338069d9bf986689ceec24341fab3a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a89338069d9bf986689ceec24341fab3a">size</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a89338069d9bf986689ceec24341fab3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or sets the size of the pool.  <a href="#a89338069d9bf986689ceec24341fab3a">More...</a><br/></td></tr>
<tr class="separator:a89338069d9bf986689ceec24341fab3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64c22a4f15d41fe5f4109ac5f6d2df58"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a64c22a4f15d41fe5f4109ac5f6d2df58">instanceCount</a><code> [get]</code></td></tr>
<tr class="memdesc:a64c22a4f15d41fe5f4109ac5f6d2df58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total number of instances currently managed by this pool.  <a href="#a64c22a4f15d41fe5f4109ac5f6d2df58">More...</a><br/></td></tr>
<tr class="separator:a64c22a4f15d41fe5f4109ac5f6d2df58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2883441f5785470a7d1359c99c7adf41"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacestrange_1_1extensions_1_1pool_1_1api.html#afb1f831222aa94de2fcb447a88146ad0">PoolOverflowBehavior</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a2883441f5785470a7d1359c99c7adf41">overflowBehavior</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a2883441f5785470a7d1359c99c7adf41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or sets the overflow behavior of this pool.  <a href="#a2883441f5785470a7d1359c99c7adf41">More...</a><br/></td></tr>
<tr class="separator:a2883441f5785470a7d1359c99c7adf41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec2e1287c8eb3d188f70e0b121614d26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacestrange_1_1extensions_1_1pool_1_1api.html#ac2dc67ad647400c4637d72c282028180">PoolInflationType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#aec2e1287c8eb3d188f70e0b121614d26">inflationType</a><code> [get, set]</code></td></tr>
<tr class="memdesc:aec2e1287c8eb3d188f70e0b121614d26"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or sets the type of inflation for infinite-sized pools.  <a href="#aec2e1287c8eb3d188f70e0b121614d26">More...</a><br/></td></tr>
<tr class="separator:aec2e1287c8eb3d188f70e0b121614d26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td colspan="2" onclick="javascript:toggleInherit('properties_interfacestrange_1_1framework_1_1api_1_1_i_managed_list')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html">strange.framework.api.IManagedList</a></td></tr>
<tr class="memitem:a563724c81cc8fe5ec08025fe94e9f351 inherit properties_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memItemLeft" align="right" valign="top">object&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_managed_list.html#a563724c81cc8fe5ec08025fe94e9f351">value</a><code> [get]</code></td></tr>
<tr class="memdesc:a563724c81cc8fe5ec08025fe94e9f351 inherit properties_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the value of this List.  <a href="#a563724c81cc8fe5ec08025fe94e9f351">More...</a><br/></td></tr>
<tr class="separator:a563724c81cc8fe5ec08025fe94e9f351 inherit properties_interfacestrange_1_1framework_1_1api_1_1_i_managed_list"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A mechanism for storing and reusing instances. </p>
<p>Unlike much of the rest of Strange, the Pool is not a Binder, per se. Rather, it holds onto instances created by other parts of your application for use and reuse. Strange applies Pools in the CommandBinder and EventDispatcher for the recycling of those instances. But you can employ Pools yourself by mapping and injecting a Pool for instances you want to reuse.</p>
<p>Basic instructions for injecting a Pool for use: Map IPool&lt;SomeClass&gt; in the InjectionBinder:</p>
<p>injectionBinder.Bind&lt;IPool&lt;MyClass&gt;&gt;().ToSingleton();</p>
<p>Then inject like so: </p>
<pre class="fragment">[Inject]
public IPool&lt;MyClass&gt; myPool { get; set; }
</pre><p>A couple of caveats for working with Pools:</p>
<ol type="1">
<li>A limitation of the version of .NET currently used by Unity forbids using interfaces or abstracts in generics. so you cannot map and inject IPool&lt;IMyInterface&gt; or IPool&lt;MyAbstractClass&gt;. This is a little confusing in Strange, since we're used to mapping injections in exactly this fashion (e.g., injectionBinder.Bind&lt;ISomeInterface&gt;). The reason this doesn't work for Pools has to do with setting properties, rather than the binding itself. But because it will bite you, we throw an Exception if you attempt to Bind or set anything but a concrete Pool type.</li>
<li>Pooling presupposes that when the instance is finished doing what it does it is cleaned up and returned to the Pool. Use <a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool.html#a00d776e7b4f1735e7da8026c7ec7386c" title="Returns an instance to the pool. ">IPool.ReturnInstance()</a> to mark an object as ready for reuse. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_poolable.html" title="Interface for items that belong to a Pool. ">strange.extensions.pool.api.IPoolable</a> for more on cleaning up. </dd></dl>
</li>
</ol>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4cbaa845454117ccec8389a27642a9b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void strange.extensions.pool.api.IPool.Clean </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove all instance references from the Pool. </p>

<p>Implemented in <a class="el" href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool.html#af4a9b202649b74935b2d02721b4c29a7">strange.extensions.pool.impl.Pool</a>.</p>

</div>
</div>
<a class="anchor" id="a07042ef56c57b6a5569de6360196ab11"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">object strange.extensions.pool.api.IPool.GetInstance </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets an instance from the pool if one is available. </p>
<dl class="section return"><dt>Returns</dt><dd>The instance.</dd></dl>

<p>Implemented in <a class="el" href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool.html#ab09cbaa24c308da83a2a923e1aaf6010">strange.extensions.pool.impl.Pool</a>, <a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_pool_3_01_t_01_4.html#abcfc75098a95cf8ad7fdca472a0fb623">strange.extensions.pool.api.IPool&lt; T &gt;</a>, and <a class="el" href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool_3_01_t_01_4.html#a56a306d7432fb57b113889acd8f2dd63">strange.extensions.pool.impl.Pool&lt; T &gt;</a>.</p>

</div>
</div>
<a class="anchor" id="a00d776e7b4f1735e7da8026c7ec7386c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void strange.extensions.pool.api.IPool.ReturnInstance </td>
          <td>(</td>
          <td class="paramtype">object&#160;</td>
          <td class="paramname"><em>value</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an instance to the pool. </p>
<p>If the instance being released implements <a class="el" href="interfacestrange_1_1extensions_1_1pool_1_1api_1_1_i_poolable.html" title="Interface for items that belong to a Pool. ">IPoolable</a>, the Release() method will be called. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>The instance to be return to the pool.</td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classstrange_1_1extensions_1_1pool_1_1impl_1_1_pool.html#a0b9746cdab600d749994dfa3de604fc2">strange.extensions.pool.impl.Pool</a>.</p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a0ad2b0ade39b7af713a0dfc3ddaec7bf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int strange.extensions.pool.api.IPool.available</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the count of non-committed instances </p>

</div>
</div>
<a class="anchor" id="aec2e1287c8eb3d188f70e0b121614d26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacestrange_1_1extensions_1_1pool_1_1api.html#ac2dc67ad647400c4637d72c282028180">PoolInflationType</a> strange.extensions.pool.api.IPool.inflationType</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets or sets the type of inflation for infinite-sized pools. </p>
<p>By default, a pool doubles its InstanceCount. </p>
<p>A PoolInflationType value.</p>

</div>
</div>
<a class="anchor" id="a64c22a4f15d41fe5f4109ac5f6d2df58"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int strange.extensions.pool.api.IPool.instanceCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the total number of instances currently managed by this pool. </p>

</div>
</div>
<a class="anchor" id="ada91aed79f4e553ceca25ef52427782c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="interfacestrange_1_1framework_1_1api_1_1_i_instance_provider.html">IInstanceProvider</a> strange.extensions.pool.api.IPool.instanceProvider</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A class that provides instances to the pool when it needs them. </p>
<p>This can be the InjectionBinder, or any class you write that satisfies the IInstanceProvider interface. </p>

</div>
</div>
<a class="anchor" id="a2883441f5785470a7d1359c99c7adf41"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacestrange_1_1extensions_1_1pool_1_1api.html#afb1f831222aa94de2fcb447a88146ad0">PoolOverflowBehavior</a> strange.extensions.pool.api.IPool.overflowBehavior</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets or sets the overflow behavior of this pool. </p>
<p>A PoolOverflowBehavior value.</p>

</div>
</div>
<a class="anchor" id="ab967eecf4fc76c5716cad1493d74d295"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Type strange.extensions.pool.api.IPool.poolType</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The object Type of the first object added to the pool. </p>
<p>Pool objects must be of the same concrete type. This property enforces that requirement. </p>

</div>
</div>
<a class="anchor" id="a89338069d9bf986689ceec24341fab3a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int strange.extensions.pool.api.IPool.size</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets or sets the size of the pool. </p>
<p>The pool size. '0' is a special value indicating infinite size. Infinite pools expand as necessary to accomodate requirement.</p>

</div>
</div>
<hr/>The documentation for this interface was generated from the following file:<ul>
<li>StrangeIoC/scripts/strange/extensions/pool/api/IPool.cs</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 28 2014 13:07:05 for StrangeIoC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
